
       PROGRAM-ID. CONCAT.
      *> Demonstrates how to contatenate Java Strings in isCOBOL without
      *> getting a "type clash" error. Neither the Java + operator nor
      *> the COBOL STRING statement will work here. However, you can
      *> use the String.concat() method.
       CONFIGURATION SECTION.
       REPOSITORY.
           CLASS J-STRING AS "java.lang.String"
           .
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  J-STRING-1  OBJECT REFERENCE J-STRING.
       01  J-STRING-2  OBJECT REFERENCE J-STRING.
       PROCEDURE DIVISION.
           SET J-STRING-1 TO J-STRING:>new("concate")
           SET J-STRING-2 TO J-STRING:>new("nation")
           DISPLAY J-STRING-1:>concat(J-STRING-2)
           GOBACK.
